home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / intrfc55.arc / HEAD.PAS < prev    next >
Pascal/Delphi Source File  |  1990-02-25  |  2KB  |  73 lines

  1. unit head;
  2. { Header declarations and dumper }
  3. interface
  4.  
  5. uses globals,util,dump;
  6.  
  7. type
  8.   header_ptr = ^header_rec;
  9.   header_rec = record
  10.     file_id: array[0..3] of char; { 0-3 }
  11.     i4,                           { 4-5 }
  12.     i6,                           { 6-7 }
  13.     ofs_this_unit,                { 8-9 }
  14.     ofs_hashtable,                { A-B }
  15.     ofs_entry_pts,                { C-D }
  16.     ofs_code_blocks,              { E-F }
  17.     ofs_const_blocks,             {10-11}
  18.     ofs_var_blocks,               {12-13}
  19.     ofs_unit_list,                {14-15}
  20.     ofs_src_name,                 {16-17}
  21.     ofs_line_lengths,             {18-19}
  22.     sym_size,                     {1A-1B}
  23.     code_size,                    {1C-1D}
  24.     const_size,                   {1E-1F}
  25.     reloc_size,                   {20-21}
  26.     vmt_size,                     {22-23}
  27.     var_size,                     {24-25}
  28.     ofs_full_hash: word;          {26-27}
  29.     other : array[$28 div 2..$3F div 2] of word; {28-3F}
  30.   end;
  31.  
  32. var
  33.   header : ^header_rec;
  34.  
  35. procedure print_header;
  36.  
  37. implementation
  38.  
  39. procedure print_header;
  40. var
  41.   i:integer;
  42. begin
  43.   with header^ do
  44.   begin
  45.     writeln('file_id:':20,file_id);
  46.     writeln('i4:':20,hexword2(i4));
  47.     writeln('i6:':20,hexword2(i6));
  48.     writeln('ofs_this_unit:':20,hexword2(ofs_this_unit));
  49.     writeln('ofs_hashtable:':20,hexword2(ofs_hashtable));
  50.     writeln('ofs_entry_pts:':20,hexword2(ofs_entry_pts));
  51.     writeln('ofs_code_blocks:':20,hexword2(ofs_code_blocks));
  52.     writeln('ofs_const_blocks:':20,hexword2(ofs_const_blocks));
  53.     writeln('ofs_var_blocks:':20,hexword2(ofs_var_blocks));
  54.     writeln('ofs_unit_list:':20,hexword2(ofs_unit_list));
  55.     writeln('ofs_src_name:':20,hexword2(ofs_src_name));
  56.     writeln('ofs_line_lengths:':20,hexword2(ofs_line_lengths));
  57.     writeln('sym_size:':20,hexword2(sym_size));
  58.     writeln('code_size:':20,hexword2(code_size));
  59.     writeln('const_size:':20,hexword2(const_size));
  60.     writeln('reloc_size:':20,hexword2(reloc_size));
  61.     writeln('vmt_size:':20,hexword2(vmt_size));
  62.     writeln('var_size:':20,hexword2(var_size));
  63.     writeln('ofs_full_hash:':20,hexword2(ofs_full_hash));
  64.  
  65.     writeln('Other:');
  66.     for i := $28 div 2 to $3f div 2 do
  67.       write(i:4,':',hexword2(other[i]):4,' ');
  68.     writeln;
  69.   end;
  70. end;
  71.  
  72. end.
  73.